package com.socket;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class ServerDemo {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(10001);
        Socket socket = serverSocket.accept();
        new Thread(new WriteThread(socket)).start();
        new Thread(new ReadThread(socket)).start();

    }
}
